package service

import (
	"github.com/jinzhu/gorm"
	"tylnmall/models"
)

func IsCar(db *gorm.DB,id int)(bool,models.Shoppingcar)  {
	var err error
	var car models.Shoppingcar
	if err=db.Where("id = ?",id).Find(&car).Error;err!=nil{
		return false,car
	}
	return true,car
}
